home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / New System Software Extensions / OpenDoc A6 / OpenDoc Parts Framework / OPF / UserStartup•OPF < prev   
Encoding:
Text File  |  1994-04-21  |  1.1 KB  |  44 lines  |  [TEXT/MPS ]

  1. # Copyright © 1994 Apple Computer, Inc.  All rights reserved.
  2. # Drop this file in your MPW Folder
  3.  
  4. if ¬ {_UserStartup•OPF_}
  5. set _UserStartup•OPF_ 1
  6. export _UserStartup•OPF_
  7.  
  8. #    Set the location of the OpenDoc Parts Framework Folder
  9. # If the folder can't be found; automatically prompts user for it and
  10. # remember where the folder was found
  11.  
  12. if  ¬ "{OPF}" && "`Exists "{ShellDirectory}"OPF_Folder`" 
  13.     Set OPF     "`Catenate "{ShellDirectory}"OPF_Folder`"
  14. End
  15. if ¬ "`Exists "{ShellDirectory}"OPF_Folder`" || ¬ "`Exists "{OPF}"`"
  16.     Set exit 0
  17.     Set temp "{Boot}"
  18.     Loop
  19.         Set temp "`(GetFileName "{temp}" -q -d -m "Where is your ∂"OPF∂" folder?")≥dev:null`"
  20.         if "{temp}"!=""
  21.             Echo -n "{temp}" > "{ShellDirectory}"OPF_Folder
  22.             Set OPF "{temp}"
  23.         Else
  24.             exit
  25.         End
  26.         (set x "`Exists "{temp}Framewrk:"`") ≥dev:null
  27.         if  "{x}"==""
  28.             Alert OPF - The ∂"{temp}∂" folder does not contain OPF files.
  29.         else
  30.             break
  31.         end
  32.     End
  33.     set exit 1
  34. End
  35.  
  36. Set OPF "`Catenate "{ShellDirectory}"OPF_Folder`"
  37. Export OPF
  38.  
  39. For __Startup__i in `(Files "{OPF}"Startup≈ || Set Status 0) ≥ dev:null`
  40.     Execute "{__Startup__i}"
  41. End
  42. Unset __Startup__i
  43.  
  44. End